// UITongJiDlg.cpp : implementation file
//

#include "stdafx.h"
#include "JianAiSSQ.h"
#include "UITongJiDlg.h"

#include "SSQChart.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CUITongJiDlg dialog


CUITongJiDlg::CUITongJiDlg(CWnd* pParent /*=NULL*/)
	: CTabPageSSL(CUITongJiDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CUITongJiDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	m_pSSQChart = NULL;

}
CUITongJiDlg::~CUITongJiDlg()
{
	if (m_pSSQChart)
	{
		delete m_pSSQChart;
		m_pSSQChart = NULL;
	}
}



void CUITongJiDlg::DoDataExchange(CDataExchange* pDX)
{
	CTabPageSSL::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CUITongJiDlg)
	DDX_Control(pDX, IDC_MSCHART_TONGJI, m_ChartTongji);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CUITongJiDlg, CTabPageSSL)
	//{{AFX_MSG_MAP(CUITongJiDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CUITongJiDlg message handlers

BOOL CUITongJiDlg::OnInitDialog() 
{
	CTabPageSSL::OnInitDialog();
	
	// TODO: Add extra initialization here
//	m_pSSQChart = new CSSQChart(&m_ChartTongji);
//	
//	m_pSSQChart->InitChart();
//	m_pSSQChart->DrawChart();
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CUITongJiDlg::SetChartData(CDataChart &DataChart)
{
	m_pSSQChart = new CSSQChart(&m_ChartTongji);
	
	m_pSSQChart->InitChart(DataChart);
	m_pSSQChart->DrawChart2();
	

}
